package net.homelinux.chaoswg.io.renga.krypto.idea;

import net.homelinux.chaoswg.io.datatypes.Unit;
import net.homelinux.chaoswg.io.higherorderfunctions.AbstractConstantFunction;
import net.homelinux.chaoswg.io.renga.core.Initializer;
import net.homelinux.chaoswg.io.renga.core.gui.operations.Operation;
import net.homelinux.chaoswg.io.renga.core.gui.operations.PrimitiveOperation;
import net.homelinux.chaoswg.io.renga.core.gui.operations.visualisations.ImageVisualisation;
import net.homelinux.chaoswg.io.renga.core.gui.operations.visualisations.NamedBlockVisualisation;
import net.homelinux.chaoswg.io.renga.core.registries.OperationRegistry;

public class IDEAInitializer extends AbstractConstantFunction<Unit> implements Initializer {

    public Unit apply() {
        OperationRegistry.getOperationRegistry ().setOperationFactory ("IDEA-Mult", new AbstractConstantFunction<Operation> () {
            public Operation apply () {
                return new PrimitiveOperation (new IDEA_Mult (), new IDEAMultAnimation (), new ImageVisualisation ("Mult.png"));
            }
        });
        OperationRegistry.getOperationRegistry ().setOperationFactory ("IDEA-KeySchedule", new AbstractConstantFunction<Operation> () {
            public Operation apply () {
                return new PrimitiveOperation (new IDEAKeySchedule (), null, new NamedBlockVisualisation (0,0, 64, 32, "IDEA-Keyschedule"));
            }
        });
        return null;
    }
}
        
